package com.niit.drugsmanager.service.Impl;

import com.niit.drugsmanager.entity.UserLog;
import com.niit.drugsmanager.repository.UserLogRepository;
import com.niit.drugsmanager.service.UserLogService;
import jakarta.transaction.Transactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@Transactional
public class UserLogServiceImpl implements UserLogService {
    @Autowired
    private UserLogRepository userLogRepository;

    @Override
    public UserLog addUserLog(UserLog userLog) {
        return userLogRepository.save(userLog);
    }

    @Override
    public List<UserLog> getAllUserLog() {
        return userLogRepository.findAll();
    }
}
